<div id="tab-sale-3" class="tab-pane">

    <div class='form-group-title'>积分抵扣</div>

    <div class="form-group">

        <label class="col-lg control-label">

            积分抵扣

        </label>

        <div class="col-sm-9 col-xs-12">

            <div class='input-group fixsingle-input-group'>

                <span class="input-group-addon">最多抵扣</span>

                <input type="text" name="deduct" value="{$item['deduct']}" class="form-control"/>

                <span class="input-group-addon">元</span>

            </div>

            <span class="help-block">如果设置0，则不支持积分抵扣</span>

        </div>

    </div>

    <div class='form-group-title'>

        团长优惠

        <div class="pull-right" style="text-align: right;padding-right: 28px;">

            是否单独设置团长优惠 <input class="js-switch small" id="discount" name="discount" value="{$item['discount']}" type="checkbox" {if !empty($item['discount'])}checked{/if}/>

        </div>

    </div>

    <div class="form-group">

        <label class="col-lg control-label">
            <input type='radio' value='0' name='headstype' {if $item['headstype']==0}checked{/if} />
        </label>

        <div class="col-sm-9 col-xs-12">

            <div class='input-group fixsingle-input-group'>

                <span class="input-group-addon">优惠金额</span>

                <input type="text" name="headsmoney" value="{$item['headsmoney']}" class="form-control"/>

                <span class="input-group-addon">元</span>

            </div>

            <span class="help-block">团长开团立减金额 </span>
        </div>

    </div>

    <div class="form-group">

        <label class="col-lg control-label">
            <input type='radio' value='1' name='headstype' {if $item['headstype']==1}checked{/if} />
        </label>

        <div class="col-sm-9 col-xs-12">
            <div class='input-group fixsingle-input-group'>

                <span class="input-group-addon">优惠折扣</span>

                <input type="text" name="headsdiscount" value="{$item['headsdiscount']}" class="form-control"/>

                <span class="input-group-addon">%</span>

            </div>

            <span class="help-block">折扣为0-100整数 ,价格=拼团价*折扣，如果设置0，则团长没有优惠金额</span>
        </div>

    </div>

    <div class="form-group">

        <label class="col-lg control-label">是否显示团长优惠</label>

        <div class="col-xs-12 col-sm-8">

            <label class="radio radio-inline">

                <input type="radio" name="isdiscount" value="1" {if intval($item['isdiscount']) ==1 }checked="checked"{/if}> 是

            </label>

            <label class="radio radio-inline">

                <input type="radio" name="isdiscount" value="0" {if intval($item['isdiscount']) ==0}checked="checked"{/if}> 否

            </label>

        </div>

    </div>

</div>

<script type="text/javascript">

    $(function(){

        $(":checkbox[name='discount']").click(function () {

            if ($(this).prop('checked')) {

                $(this).val(1);

            }else {
                $(this).val(0);
            }
        })
    })
</script>